﻿@model TJBHJJ.Models.News
@{
    ViewBag.Title = "编辑新闻";
    //if (IsAjax)
    //{
    //    Layout = null;
    //}
    //else
    //{
    //    Layout = "~/Views/Shared/_LayoutManager.cshtml";
    //}
}
@*<h2>
    NewEdit</h2>*@ @*<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
*@
<script type="text/javascript">
    var editor;
    KindEditor.ready(function (K) {
        editor = K.create('#Content',
        {
            allowFileManager: true,
            uploadJson: '/Manager/UploadImage'
        });
    });
    $(function () {
        $("#tabs").tabs();
    });
</script>
<div id="tabs">
    <ul>
        <li><a href="#tabs-1">编辑新闻</a></li>
    </ul>
    <div id="tabs-1">
        @using (Html.BeginForm("NewEdit", "Manager",FormMethod.Post))
        {
            @Html.ValidationSummary(true)
            @Html.HiddenFor(model => model.Id)
            @Html.HiddenFor(model => model.ReadCount)
            @Html.HiddenFor(model => model.GuidGid)
            @Html.HiddenFor(model => model.CreatTime)
            @Html.HiddenFor(model => model.ClassId)
            <table>
                <tr>
                    <td style="width:100px;">
                        标题：
                    </td>
                    <td>
                        @Html.EditorFor(model => model.Title)
                        @Html.ValidationMessageFor(model => model.Title)
                    </td>
                </tr>
                <tr>
                    <td>
                        内容：
                    </td>
                    <td>
                        @Html.TextAreaFor(model => model.Content, new { style = "width:700px;height:300px" })
                        @Html.ValidationMessageFor(model => model.Content)
                    </td>
                </tr>
                <tr>
                    <td>
                        作者：
                    </td>
                    <td>@Html.EditorFor(model => model.Author)
                        @Html.ValidationMessageFor(model => model.Author)
                    </td>
                </tr>
                <tr>
                    <td>
                        是否发布：
                    </td>
                    <td>@Html.EditorFor(model => model.IsDisplay)
                        @Html.ValidationMessageFor(model => model.IsDisplay)
                    </td>
                </tr>
            </table>
            <p>
                <input type="submit" value="保存" />
            </p>
            @Html.ActionLink("返回列表", "NewList", new { page = (int)ViewData["pageIndex"] })
        }
    </div>
</div>
